/*      */ package me.wazup.kitbattle;
/*      */ 
/*      */ import java.io.InputStream;
/*      */ import java.util.ArrayList;
/*      */ import java.util.Arrays;
/*      */ import org.bukkit.Color;
/*      */ import org.bukkit.configuration.file.FileConfiguration;
/*      */ import org.bukkit.configuration.file.YamlConfiguration;
/*      */ import org.bukkit.inventory.ItemStack;
/*      */ 
/*      */ public class FileManager {
/*      */   private main plugin;
/*      */   private FileConfiguration PlayersConfig;
/*      */   private File customPlayersConfig;
/*      */   private FileConfiguration MapsConfig;
/*      */   private File customMapsConfig;
/*      */   private FileConfiguration KitsConfig;
/*      */   private File customKitsConfig;
/*      */   private FileConfiguration RanksConfig;
/*      */   private File customRanksConfig;
/*      */   private FileConfiguration MessagesConfig;
/*      */   private File customMessagesConfig;
/*      */   private FileConfiguration AbilitiesConfig;
/*      */   private File customAbilitiesConfig;
/*      */   private FileConfiguration SignsConfig;
/*      */   private File customSignsConfig;
/*      */   List<String> armorParts;
/*      */   
/*   29 */   public FileManager(main plugin) { this.PlayersConfig = null;
/*   30 */     this.customPlayersConfig = null;
/*      */     
/*   32 */     this.MapsConfig = null;
/*   33 */     this.customMapsConfig = null;
/*      */     
/*   35 */     this.KitsConfig = null;
/*   36 */     this.customKitsConfig = null;
/*      */     
/*   38 */     this.RanksConfig = null;
/*   39 */     this.customRanksConfig = null;
/*      */     
/*   41 */     this.MessagesConfig = null;
/*   42 */     this.customMessagesConfig = null;
/*      */     
/*   44 */     this.AbilitiesConfig = null;
/*   45 */     this.customAbilitiesConfig = null;
/*      */     
/*   47 */     this.SignsConfig = null;
/*   48 */     this.customSignsConfig = null;
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */ 
/*      */     
/*  949 */     this.armorParts = Arrays.asList(new String[] { "Boots", "Leggings", "Chestplate", "Helmet" }); this.plugin = plugin; }
/*      */   public void loadAll() { this.customPlayersConfig = new File(this.plugin.getDataFolder(), "players.yml"); this.PlayersConfig = (FileConfiguration)YamlConfiguration.loadConfiguration(this.customPlayersConfig); this.customMapsConfig = new File(this.plugin.getDataFolder(), "maps.yml"); this.MapsConfig = (FileConfiguration)YamlConfiguration.loadConfiguration(this.customMapsConfig); this.customKitsConfig = new File(this.plugin.getDataFolder(), "kits.yml"); this.KitsConfig = (FileConfiguration)YamlConfiguration.loadConfiguration(this.customKitsConfig); this.customRanksConfig = new File(this.plugin.getDataFolder(), "ranks.yml"); this.RanksConfig = (FileConfiguration)YamlConfiguration.loadConfiguration(this.customRanksConfig); this.customMessagesConfig = new File(this.plugin.getDataFolder(), "messages.yml"); this.MessagesConfig = (FileConfiguration)YamlConfiguration.loadConfiguration(this.customMessagesConfig); this.customAbilitiesConfig = new File(this.plugin.getDataFolder(), "abilities.yml"); this.AbilitiesConfig = (FileConfiguration)YamlConfiguration.loadConfiguration(this.customAbilitiesConfig); this.customSignsConfig = new File(this.plugin.getDataFolder(), "signs.yml"); this.SignsConfig = (FileConfiguration)YamlConfiguration.loadConfiguration(this.customSignsConfig); }
/*      */   public void setupAll() { loadAll(); this.plugin.reloadConfig(); this.plugin.getConfig().options().copyDefaults(true); this.plugin.saveConfig(); reloadPlayersConfig(); getPlayersConfig().options().copyDefaults(true); savePlayersConfig(); reloadMapsConfig(); getMapsConfig().options().copyDefaults(true); saveMapsConfig(); reloadKitsConfig(); getKitsConfig().options().copyDefaults(true); saveKitsConfig(); reloadRanksConfig(); getRanksConfig().options().copyDefaults(true); saveRanksConfig(); reloadMessagesConfig(); getMessagesConfig().options().copyDefaults(true); saveMessagesConfig(); reloadAbilitiesConfig(); getAbilitiesConfig().options().copyDefaults(true); saveAbilitiesConfig(); reloadSignsConfig(); getSignsConfig().options().copyDefaults(true); saveSignsConfig(); }
/*  952 */   public void reloadPlayersConfig() { InputStream defConfigStream = this.plugin.getResource("players.yml"); if (defConfigStream != null) { YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream); this.PlayersConfig.setDefaults((Configuration)defConfig); }  } public void savePlayersConfig() { for (int i = 0; i < 4; i++) { try { if (i == 3) { this.plugin.logger.info("[KitBattle] Couldn't save players.yml!"); break; }  this.PlayersConfig.save(this.customPlayersConfig); break; } catch (Exception exception) {} }  } public void reloadMapsConfig() { InputStream defConfigStream = this.plugin.getResource("maps.yml"); if (defConfigStream != null) { YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream); this.MapsConfig.setDefaults((Configuration)defConfig); }  } public void saveMapsConfig() { try { this.MapsConfig.save(this.customMapsConfig); } catch (IOException ex) { this.plugin.logger.info("[KitBattle] Couldn't save maps.yml!"); }  } public void reloadKitsConfig() { InputStream defConfigStream = this.plugin.getResource("kits.yml"); if (defConfigStream != null) { YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream); this.KitsConfig.setDefaults((Configuration)defConfig); }  } public void saveKitsConfig() { try { this.KitsConfig.save(this.customKitsConfig); } catch (IOException ex) { this.plugin.logger.info("[KitBattle] Couldn't save kits.yml!"); }  } public void reloadRanksConfig() { InputStream defConfigStream = this.plugin.getResource("ranks.yml"); if (defConfigStream != null) { YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream); this.RanksConfig.setDefaults((Configuration)defConfig); }  } public void saveRanksConfig() { try { this.RanksConfig.save(this.customRanksConfig); } catch (IOException ex) { this.plugin.logger.info("[KitBattle] Couldn't save ranks.yml!"); }  } public void reloadMessagesConfig() { InputStream defConfigStream = this.plugin.getResource("messages.yml"); if (defConfigStream != null) { YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream); this.MessagesConfig.setDefaults((Configuration)defConfig); }  } public void saveMessagesConfig() { try { this.MessagesConfig.save(this.customMessagesConfig); } catch (IOException ex) { this.plugin.logger.info("[KitBattle] Couldn't save messages.yml!"); }  } public void loadKits() { if (this.KitsConfig.getConfigurationSection("Kits") == null)
/*  953 */       return;  for (String kitName : this.KitsConfig.getConfigurationSection("Kits").getKeys(false))
/*      */     
/*  955 */     { ItemStack logo = null;
/*  956 */       ItemStack[] armor = new ItemStack[4];
/*  957 */       ItemStack[] items = new ItemStack[36];
/*      */       
/*  959 */       boolean Enabled = this.KitsConfig.getBoolean("Kits." + kitName + ".Enabled");
/*  960 */       boolean requirePermission = this.KitsConfig.getBoolean("Kits." + kitName + ".Require-Permission");
/*      */       
/*      */       try {
/*  963 */         String target = this.KitsConfig.getString("Kits." + kitName + ".Item");
/*  964 */         if (target.contains(":")) {
/*  965 */           logo = this.plugin.setName(new ItemStack(Material.getMaterial(target.split(":")[0]), 1, Short.valueOf(target.split(":")[1]).shortValue()), ChatColor.GREEN + kitName);
/*      */         } else {
/*  967 */           logo = this.plugin.setName(new ItemStack(Material.getMaterial(target)), ChatColor.GREEN + kitName);
/*      */         } 
/*  969 */         for (String lore : this.KitsConfig.getStringList("Kits." + kitName + ".Description")) {
/*  970 */           this.plugin.addLore(logo, ChatColor.translateAlternateColorCodes('&', lore));
/*      */         }
/*  972 */       } catch (Exception e) {
/*  973 */         this.plugin.logger.info("[KitBattle] Failed to create the logo for the kit: " + kitName + ", due to that, the whole kit wont load!, make sure you have the correct format!");
/*  974 */         e.printStackTrace();
/*      */         
/*      */         continue;
/*      */       } 
/*      */       
/*  979 */       int x = 0;
/*  980 */       for (String part : this.armorParts) {
/*      */         try {
/*  982 */           armor[x] = this.KitsConfig.getString("Kits." + kitName + ".Armor." + part).isEmpty() ? new ItemStack(Material.AIR) : getItemstackFilled(this.KitsConfig.getString("Kits." + kitName + ".Armor." + part));
/*  983 */           x++;
/*  984 */         } catch (Exception e) {
/*  985 */           this.plugin.logger.info("[KitBattle] Failed to create a " + part + " for the kit: " + kitName + ", due to that, the whole kit wont load!, make sure you have the correct format!");
/*  986 */           e.printStackTrace();
/*      */         } 
/*      */       } 
/*      */ 
/*      */ 
/*      */       
/*  992 */       int o = 0;
/*  993 */       for (String itemName : this.KitsConfig.getStringList("Kits." + kitName + ".Items")) {
/*      */         try {
/*  995 */           items[o] = itemName.isEmpty() ? new ItemStack(Material.AIR) : getItemstackFilled(itemName);
/*  996 */           o++;
/*  997 */         } catch (Exception e) {
/*  998 */           this.plugin.logger.info("[KitBattle] Failed to create this item: " + itemName + " for the kit: " + kitName + ", due to that, the whole kit wont load!, make sure you have the correct format!");
/*  999 */           e.printStackTrace();
/*      */         } 
/*      */       } 
/*      */ 
/*      */       
/* 1004 */       int Price = this.KitsConfig.getInt("Kits." + kitName + ".Price");
/* 1005 */       Collection<PotionEffect> effects = new ArrayList<PotionEffect>();
/*      */       
/* 1007 */       for (String potionName : this.KitsConfig.getStringList("Kits." + kitName + ".Potion-Effects")) {
/* 1008 */         String[] spliter = potionName.split(" : ");
/* 1009 */         effects.add(new PotionEffect(PotionEffectType.getByName(spliter[0]), Integer.valueOf(spliter[1]).intValue() * 20, Integer.valueOf(spliter[2]).intValue() - 1));
/*      */       } 
/*      */       
/* 1012 */       ArrayList<Ability> abilities = new ArrayList<Ability>();
/* 1013 */       for (String ability : this.KitsConfig.getStringList("Kits." + kitName + ".Abilities")) {
/* 1014 */         byte b; int i; Ability[] arrayOfAbility; for (i = (arrayOfAbility = Ability.values()).length, b = 0; b < i; ) { Ability oo = arrayOfAbility[b];
/* 1015 */           if (ability.equalsIgnoreCase(oo.name())) {
/* 1016 */             abilities.add(oo);
/*      */           }
/*      */           b++; }
/*      */       
/*      */       } 
/* 1021 */       this.plugin.Kits.put(kitName.toLowerCase(), new Kit(kitName, logo, items, armor, Price, effects, abilities, Enabled, requirePermission)); }  }
/*      */   public void reloadAbilitiesConfig() { InputStream defConfigStream = this.plugin.getResource("abilities.yml"); if (defConfigStream != null) { YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream); this.AbilitiesConfig.setDefaults((Configuration)defConfig); }  }
/*      */   public void saveAbilitiesConfig() { try { this.AbilitiesConfig.save(this.customAbilitiesConfig); } catch (IOException ex) { this.plugin.logger.info("[KitBattle] Couldn't save abilities.yml!"); }  }
/*      */   public void reloadSignsConfig() { InputStream defConfigStream = this.plugin.getResource("signs.yml"); if (defConfigStream != null) { YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream); this.SignsConfig.setDefaults((Configuration)defConfig); }  }
/*      */   public void saveSignsConfig() { try { this.SignsConfig.save(this.customSignsConfig); } catch (IOException ex) { this.plugin.logger.info("[KitBattle] Couldn't save signs.yml!"); }  }
/* 1026 */   public FileConfiguration getPlayersConfig() { return this.PlayersConfig; } public FileConfiguration getMapsConfig() { return this.MapsConfig; } public FileConfiguration getKitsConfig() { return this.KitsConfig; } public FileConfiguration getRanksConfig() { return this.RanksConfig; } public FileConfiguration getMessagesConfig() { return this.MessagesConfig; } public FileConfiguration getAbilitiesConfig() { return this.AbilitiesConfig; } public FileConfiguration getSignsConfig() { return this.SignsConfig; } public void setupKits() { if (!this.plugin.getConfig().getBoolean("Create-Default-Kits")) return;  this.plugin.getConfig().set("Create-Default-Kits", Boolean.valueOf(false)); this.plugin.saveConfig(); if (!this.KitsConfig.contains("Kits.Pvp")) { this.KitsConfig.set("Kits.Pvp.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Pvp.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Pvp.Item", "DIAMOND_SWORD"); this.KitsConfig.set("Kits.Pvp.Price", Integer.valueOf(0)); this.KitsConfig.set("Kits.Pvp.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Pvp.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Pvp.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Pvp.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1 : enchant:DAMAGE_ALL:1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Pvp.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Pvp.Abilities", abilities); this.KitsConfig.set("Kits.Pvp.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Pvp.Description", Arrays.asList(new String[] { "&bA very basic but strong kit!" })); }  if (!this.KitsConfig.contains("Kits.Archer")) { this.KitsConfig.set("Kits.Archer.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Archer.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Archer.Item", "BOW"); this.KitsConfig.set("Kits.Archer.Price", Integer.valueOf(100)); this.KitsConfig.set("Kits.Archer.Armor.Helmet", "LEATHER_HELMET : 1"); this.KitsConfig.set("Kits.Archer.Armor.Chestplate", "LEATHER_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Archer.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Archer.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("BOW : 1 : enchant:ARROW_DAMAGE:1"); items.add("ARROW : 64"); for (int i = 0; i < 33; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Archer.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Archer.Abilities", abilities); this.KitsConfig.set("Kits.Archer.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Archer.Description", Arrays.asList(new String[] { "&bStart with a sword and a strong bow", "&band a stack of arrows" })); }  if (!this.KitsConfig.contains("Kits.Ninja")) { this.KitsConfig.set("Kits.Ninja.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Ninja.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Ninja.Item", "NETHER_STAR"); this.KitsConfig.set("Kits.Ninja.Price", Integer.valueOf(200)); this.KitsConfig.set("Kits.Ninja.Armor.Helmet", "LEATHER_HELMET : 1 : dye:BLACK"); this.KitsConfig.set("Kits.Ninja.Armor.Chestplate", "CHAINMAIL_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Ninja.Armor.Leggings", "CHAINMAIL_LEGGINGS : 1"); this.KitsConfig.set("Kits.Ninja.Armor.Boots", "DIAMOND_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Ninja.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Ninja.Abilities", abilities); this.KitsConfig.set("Kits.Ninja.Potion-Effects", Arrays.asList(new String[] { "SPEED : 999999 : 2" })); this.KitsConfig.set("Kits.Ninja.Description", Arrays.asList(new String[] { "&bStart with a diamond sword", "&band week armor", "&bAnd infinite speed 2 potion" })); }  if (!this.KitsConfig.contains("Kits.Tank")) { this.KitsConfig.set("Kits.Tank.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Tank.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Tank.Item", "DIAMOND_CHESTPLATE"); this.KitsConfig.set("Kits.Tank.Price", Integer.valueOf(400)); this.KitsConfig.set("Kits.Tank.Armor.Helmet", "DIAMOND_HELMET : 1"); this.KitsConfig.set("Kits.Tank.Armor.Chestplate", "DIAMOND_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Tank.Armor.Leggings", "DIAMOND_LEGGINGS : 1"); this.KitsConfig.set("Kits.Tank.Armor.Boots", "DIAMOND_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("IRON_SWORD : 1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Tank.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Tank.Abilities", abilities); this.KitsConfig.set("Kits.Tank.Potion-Effects", Arrays.asList(new String[] { "SLOW : 999999 : 2" })); this.KitsConfig.set("Kits.Tank.Description", Arrays.asList(new String[] { "&bStart with diamond armor", "&band an iron sword", "&bbut a slowness effect" })); }  if (!this.KitsConfig.contains("Kits.Pyro")) { this.KitsConfig.set("Kits.Pyro.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Pyro.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Pyro.Item", "FLINT_AND_STEEL"); this.KitsConfig.set("Kits.Pyro.Price", Integer.valueOf(500)); this.KitsConfig.set("Kits.Pyro.Armor.Helmet", "LEATHER_HELMET : 1 : enchant:PROTECTION_FIRE:5"); this.KitsConfig.set("Kits.Pyro.Armor.Chestplate", "IRON_CHESTPLATE : 1 : enchant:PROTECTION_FIRE:5"); this.KitsConfig.set("Kits.Pyro.Armor.Leggings", "LEATHER_LEGGINGS : 1 : enchant:PROTECTION_FIRE:5"); this.KitsConfig.set("Kits.Pyro.Armor.Boots", "IRON_BOOTS : 1 : enchant:PROTECTION_FIRE:5"); ArrayList<String> items = new ArrayList<String>(); items.add("IRON_SWORD : 1 : enchant:FIRE_ASPECT:1"); items.add("BOW : 1 : enchant:ARROW_FIRE:1"); items.add("ARROW : 64"); for (int i = 0; i < 33; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Pyro.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Pyro.Abilities", abilities); this.KitsConfig.set("Kits.Pyro.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Pyro.Description", Arrays.asList(new String[] { "&bStart with a fiery sword", "&band a fiery bow", "&band fire protection armor" })); }  if (!this.KitsConfig.contains("Kits.Assassin")) { this.KitsConfig.set("Kits.Assassin.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Assassin.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Assassin.Item", "GOLD_SWORD"); this.KitsConfig.set("Kits.Assassin.Price", Integer.valueOf(600)); this.KitsConfig.set("Kits.Assassin.Armor.Helmet", "LEATHER_HELMET : 1 : dye:RED"); this.KitsConfig.set("Kits.Assassin.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Assassin.Armor.Leggings", "LEATHER_LEGGINGS : 1"); this.KitsConfig.set("Kits.Assassin.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("GOLD_SWORD:32 : 1 : enchant:DAMAGE_ALL:22"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Assassin.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Assassin.Abilities", abilities); this.KitsConfig.set("Kits.Assassin.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Assassin.Description", Arrays.asList(new String[] { "&bGet an&b extra almost insta kill sword", "&bthat only has 1 use per life" })); }  if (!this.KitsConfig.contains("Kits.Zombie")) { this.KitsConfig.set("Kits.Zombie.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Zombie.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Zombie.Item", "SKULL_ITEM:2"); this.KitsConfig.set("Kits.Zombie.Price", Integer.valueOf(1000)); this.KitsConfig.set("Kits.Zombie.Armor.Helmet", "LEATHER_HELMET : 1 : dye:GREEN"); this.KitsConfig.set("Kits.Zombie.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Zombie.Armor.Leggings", "CHAINMAIL_LEGGINGS : 1"); this.KitsConfig.set("Kits.Zombie.Armor.Boots", "LEATHER_BOOTS : 1 : dye:GREEN"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Zombie.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Zombie.Abilities", abilities); this.KitsConfig.set("Kits.Zombie.Potion-Effects", Arrays.asList(new String[] { "HEALTH_BOOST : 999999 : 5" })); this.KitsConfig.set("Kits.Zombie.Description", Arrays.asList(new String[] { "&bStart with extra bar of hearts" })); }  if (!this.KitsConfig.contains("Kits.Kangaroo")) { this.KitsConfig.set("Kits.Kangaroo.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Kangaroo.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Kangaroo.Item", "FIREWORK"); this.KitsConfig.set("Kits.Kangaroo.Price", Integer.valueOf(800)); this.KitsConfig.set("Kits.Kangaroo.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Kangaroo.Armor.Chestplate", "LEATHER_CHESTPLATE : 1 : dye:YELLOW"); this.KitsConfig.set("Kits.Kangaroo.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Kangaroo.Armor.Boots", "DIAMOND_BOOTS : 1 : enchant:PROTECTION_FALL:5"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("FIREWORK : 1 : name:&cKangaroo rocket"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Kangaroo.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Kangaroo"); this.KitsConfig.set("Kits.Kangaroo.Abilities", abilities); this.KitsConfig.set("Kits.Kangaroo.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Kangaroo.Description", Arrays.asList(new String[] { "&bGet a rocket that will launch you", "&bin the way you are looking!", "&bAnd its almost anti fall kit!", "&bTip: Shifting will boost you", "&bForward!" })); }  if (!this.KitsConfig.contains("Kits.Hades")) { this.KitsConfig.set("Kits.Hades.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Hades.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Hades.Item", "BONE"); this.KitsConfig.set("Kits.Hades.Price", Integer.valueOf(1200)); this.KitsConfig.set("Kits.Hades.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Hades.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Hades.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Hades.Armor.Boots", "LEATHER_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("BONE : 1 : name:&cSummoning bone"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Hades.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Hades"); this.KitsConfig.set("Kits.Hades.Abilities", abilities); this.KitsConfig.set("Kits.Hades.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Hades.Description", Arrays.asList(new String[] { "&bGet a bone that will summon", "&bDogs that will fight for you!" })); }  if (!this.KitsConfig.contains("Kits.Switcher")) { this.KitsConfig.set("Kits.Switcher.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Switcher.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Switcher.Item", "SNOW_BALL"); this.KitsConfig.set("Kits.Switcher.Price", Integer.valueOf(600)); this.KitsConfig.set("Kits.Switcher.Armor.Helmet", "LEATHER_HELMET : 1 : dye:WHITE"); this.KitsConfig.set("Kits.Switcher.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Switcher.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Switcher.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("SNOW_BALL : 16 : name:&cSwitch!"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Switcher.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Switcher"); this.KitsConfig.set("Kits.Switcher.Abilities", abilities); this.KitsConfig.set("Kits.Switcher.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Switcher.Description", Arrays.asList(new String[] { "&bThrow a snowball at someone", "&bTo swap your locations!" })); }  if (!this.KitsConfig.contains("Kits.Thor")) { this.KitsConfig.set("Kits.Thor.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Thor.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Thor.Item", "WOOD_AXE"); this.KitsConfig.set("Kits.Thor.Price", Integer.valueOf(900)); this.KitsConfig.set("Kits.Thor.Armor.Helmet", "LEATHER_HELMET : 1"); this.KitsConfig.set("Kits.Thor.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Thor.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Thor.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("WOOD_AXE : 1 : name:&cAlmighty axe!"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Thor.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Thor"); this.KitsConfig.set("Kits.Thor.Abilities", abilities); this.KitsConfig.set("Kits.Thor.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Thor.Description", Arrays.asList(new String[] { "&bGet an axe that will", "&bStrike lightning on nearby enemies!" })); }  if (!this.KitsConfig.contains("Kits.Stomper")) { this.KitsConfig.set("Kits.Stomper.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Stomper.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Stomper.Item", "FEATHER"); this.KitsConfig.set("Kits.Stomper.Price", Integer.valueOf(500)); this.KitsConfig.set("Kits.Stomper.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Stomper.Armor.Chestplate", "LEATHER_CHESTPLATE : 1 : dye:RED"); this.KitsConfig.set("Kits.Stomper.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Stomper.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1 : enchant:DAMAGE_ALL:1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Stomper.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Stomper"); this.KitsConfig.set("Kits.Stomper.Abilities", abilities); this.KitsConfig.set("Kits.Stomper.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Stomper.Description", Arrays.asList(new String[] { "&bJump on someone from a height", "&bTo deal some damage!", "&bThe higher you are the more", "&bDamage you will deal", "&bBut if the target is shifting", "&bYou wont deal as much damage!", "&bYou also have a MAX fall damage", "&bSo you wont die from falling" })); }  if (!this.KitsConfig.contains("Kits.Ghost")) { this.KitsConfig.set("Kits.Ghost.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Ghost.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Ghost.Item", "POTION:8270"); this.KitsConfig.set("Kits.Ghost.Price", Integer.valueOf(400)); this.KitsConfig.set("Kits.Ghost.Armor.Helmet", ""); this.KitsConfig.set("Kits.Ghost.Armor.Chestplate", ""); this.KitsConfig.set("Kits.Ghost.Armor.Leggings", ""); this.KitsConfig.set("Kits.Ghost.Armor.Boots", ""); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1 : enchant:DAMAGE_ALL:1"); items.add(""); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Ghost.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Ghost.Abilities", abilities); this.KitsConfig.set("Kits.Ghost.Potion-Effects", Arrays.asList(new String[] { "INVISIBILITY : 999999 : 1" })); this.KitsConfig.set("Kits.Ghost.Description", Arrays.asList(new String[] { "&bBe invisible with a potion effect", "&bUnfortunately, you wont have armor", "&bTo be fully invisible!" })); }  if (!this.KitsConfig.contains("Kits.Miner")) { this.KitsConfig.set("Kits.Miner.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Miner.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Miner.Item", "LEATHER_HELMET"); this.KitsConfig.set("Kits.Miner.Price", Integer.valueOf(700)); this.KitsConfig.set("Kits.Miner.Armor.Helmet", "LEATHER_HELMET : 1 : dye:YELLOW"); this.KitsConfig.set("Kits.Miner.Armor.Chestplate", "LEATHER_CHESTPLATE : 1 : dye:YELLOW"); this.KitsConfig.set("Kits.Miner.Armor.Leggings", "LEATHER_LEGGINGS : 1 : dye:YELLOW"); this.KitsConfig.set("Kits.Miner.Armor.Boots", "LEATHER_BOOTS : 1 : dye:YELLOW"); ArrayList<String> items = new ArrayList<String>(); items.add("STONE_SWORD : 1 : enchant:DURABILITY:3"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Miner.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Miner.Abilities", abilities); this.KitsConfig.set("Kits.Miner.Potion-Effects", Arrays.asList(new String[] { "INCREASE_DAMAGE : 999999 : 1", "SPEED : 999999 : 1", "NIGHT_VISION : 999999 : 1" })); this.KitsConfig.set("Kits.Miner.Description", Arrays.asList(new String[] { "&bMining for hours has really taught", "&bYou to be strong and fast and can see", "&bIn darkness", "&bToo bad you actually never found any goods" })); }  if (!this.KitsConfig.contains("Kits.Spiderman")) { this.KitsConfig.set("Kits.Spiderman.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Spiderman.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Spiderman.Item", "WEB"); this.KitsConfig.set("Kits.Spiderman.Price", Integer.valueOf(1000)); this.KitsConfig.set("Kits.Spiderman.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Spiderman.Armor.Chestplate", "LEATHER_CHESTPLATE : 1 : dye:BLUE"); this.KitsConfig.set("Kits.Spiderman.Armor.Leggings", "DIAMOND_LEGGINGS : 1"); this.KitsConfig.set("Kits.Spiderman.Armor.Boots", "DIAMOND_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("WEB : 1"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Spiderman.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Spiderman"); this.KitsConfig.set("Kits.Spiderman.Abilities", abilities); this.KitsConfig.set("Kits.Spiderman.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Spiderman.Description", Arrays.asList(new String[] { "&bThrow snowballs at your target", "&bTo put them in a web for", "&bFew seconds!" })); }  if (!this.KitsConfig.contains("Kits.Prisoner")) { this.KitsConfig.set("Kits.Prisoner.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Prisoner.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Prisoner.Item", "LAVA"); this.KitsConfig.set("Kits.Prisoner.Price", Integer.valueOf(4000)); this.KitsConfig.set("Kits.Prisoner.Armor.Helmet", "DIAMOND_HELMET : 1"); this.KitsConfig.set("Kits.Prisoner.Armor.Chestplate", "LEATHER_CHESTPLATE : 1 : dye:RED"); this.KitsConfig.set("Kits.Prisoner.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Prisoner.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("IRON_FENCE : 1 : name:&4Prison"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Prisoner.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Prisoner"); this.KitsConfig.set("Kits.Prisoner.Abilities", abilities); this.KitsConfig.set("Kits.Prisoner.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Prisoner.Description", Arrays.asList(new String[] { "&bShoot a snowball and send", "&bThose murderers to the LAVA jail" })); }  if (!this.KitsConfig.contains("Kits.Climber")) { this.KitsConfig.set("Kits.Climber.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Climber.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Climber.Item", "TRIPWIRE_HOOK"); this.KitsConfig.set("Kits.Climber.Price", Integer.valueOf(350)); this.KitsConfig.set("Kits.Climber.Armor.Helmet", "LEATHER_HELMET : 1 : dye:YELLOW"); this.KitsConfig.set("Kits.Climber.Armor.Chestplate", "CHAINMAIL_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Climber.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Climber.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("BOW : 1 : enchant:ARROW_INFINITE:1"); items.add("ARROW : 1"); for (int i = 0; i < 33; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Climber.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Climber"); this.KitsConfig.set("Kits.Climber.Abilities", abilities); this.KitsConfig.set("Kits.Climber.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Climber.Description", Arrays.asList(new String[] { "&bUse your bow to summon", "&bA magical chicken that will carry you" })); }  if (!this.KitsConfig.contains("Kits.Dragon")) { this.KitsConfig.set("Kits.Dragon.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Dragon.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Dragon.Item", "FIREBALL"); this.KitsConfig.set("Kits.Dragon.Price", Integer.valueOf(1000)); this.KitsConfig.set("Kits.Dragon.Armor.Helmet", "LEATHER_HELMET : 1 : dye:RED"); this.KitsConfig.set("Kits.Dragon.Armor.Chestplate", "DIAMOND_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Dragon.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Dragon.Armor.Boots", "LEATHER_BOOTS : 1 : dye:RED"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("FIREBALL : 1 : name:&cFlames"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Dragon.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Dragon"); this.KitsConfig.set("Kits.Dragon.Abilities", abilities); this.KitsConfig.set("Kits.Dragon.Potion-Effects", Arrays.asList(new String[] { "FIRE_RESISTANCE : 999999 : 1" })); this.KitsConfig.set("Kits.Dragon.Description", Arrays.asList(new String[] { "&bBreathe fire!", "&bAnd be immune for fire damage" })); }  if (!this.KitsConfig.contains("Kits.Suicidal")) { this.KitsConfig.set("Kits.Suicidal.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Suicidal.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Suicidal.Item", "TNT"); this.KitsConfig.set("Kits.Suicidal.Price", Integer.valueOf(250)); this.KitsConfig.set("Kits.Suicidal.Armor.Helmet", "LEATHER_HELMET : 1 : dye:RED"); this.KitsConfig.set("Kits.Suicidal.Armor.Chestplate", "LEATHER_CHESTPLATE : 1 : dye:RED"); this.KitsConfig.set("Kits.Suicidal.Armor.Leggings", "LEATHER_LEGGINGS : 1 : dye:RED"); this.KitsConfig.set("Kits.Suicidal.Armor.Boots", "LEATHER_BOOTS : 1 : dye:RED"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("REDSTONE_TORCH_ON : 1 : name:&cSuicide!"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Suicidal.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Suicidal"); this.KitsConfig.set("Kits.Suicidal.Abilities", abilities); this.KitsConfig.set("Kits.Suicidal.Potion-Effects", Arrays.asList(new String[] { "SPEED : 999999 : 1" })); this.KitsConfig.set("Kits.Suicidal.Description", Arrays.asList(new String[] { "&bUse your torch to active", "&bThe tnt inside you and", "&bBlow up along nearby enemies" })); }  if (!this.KitsConfig.contains("Kits.Phantom")) { this.KitsConfig.set("Kits.Phantom.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Phantom.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Phantom.Item", "BOOK"); this.KitsConfig.set("Kits.Phantom.Price", Integer.valueOf(800)); this.KitsConfig.set("Kits.Phantom.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Phantom.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Phantom.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Phantom.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("BOOK : 1 : name:&cFly!"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Phantom.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Phantom"); this.KitsConfig.set("Kits.Phantom.Abilities", abilities); this.KitsConfig.set("Kits.Phantom.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Phantom.Description", Arrays.asList(new String[] { "&bUse your magical book to have the", "&bAbility of flying for few seconds" })); }  if (!this.KitsConfig.contains("Kits.Timelord")) { this.KitsConfig.set("Kits.Timelord.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Timelord.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Timelord.Item", "WATCH"); this.KitsConfig.set("Kits.Timelord.Price", Integer.valueOf(900)); this.KitsConfig.set("Kits.Timelord.Armor.Helmet", "LEATHER_HELMET : 1 : dye:BLACK"); this.KitsConfig.set("Kits.Timelord.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Timelord.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Timelord.Armor.Boots", "LEATHER_BOOTS : 1 : dye:BLACK"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("WATCH : 1 : name:&cFreeze!"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Timelord.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Timelord"); this.KitsConfig.set("Kits.Timelord.Abilities", abilities); this.KitsConfig.set("Kits.Timelord.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Timelord.Description", Arrays.asList(new String[] { "&bUse your magical clock to", "&bPrevent players around you", "&bFrom moving" })); }  if (!this.KitsConfig.contains("Kits.Fisherman")) { this.KitsConfig.set("Kits.Fisherman.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Fisherman.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Fisherman.Item", "FISHING_ROD"); this.KitsConfig.set("Kits.Fisherman.Price", Integer.valueOf(900)); this.KitsConfig.set("Kits.Fisherman.Armor.Helmet", "LEATHER_HELMET : 1"); this.KitsConfig.set("Kits.Fisherman.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Fisherman.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Fisherman.Armor.Boots", "LEATHER_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1 : enchant:DAMAGE_ALL:1"); items.add("FISHING_ROD : 1 : enchant:DURABILITY:2"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Fisherman.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Fisherman"); this.KitsConfig.set("Kits.Fisherman.Abilities", abilities); this.KitsConfig.set("Kits.Fisherman.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Fisherman.Description", Arrays.asList(new String[] { "&bGet a fishing rod that", "&bAllows you to teleport caught", "&bEntities to you" })); }  if (!this.KitsConfig.contains("Kits.Vanilla")) { this.KitsConfig.set("Kits.Vanilla.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Vanilla.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Vanilla.Item", "POTION:16421"); this.KitsConfig.set("Kits.Vanilla.Price", Integer.valueOf(200)); this.KitsConfig.set("Kits.Vanilla.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Vanilla.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Vanilla.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Vanilla.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1 : enchant:DAMAGE_ALL:1"); items.add("POTION:16385 : 1"); items.add("POTION:16386 : 1"); items.add("POTION:16388 : 1"); items.add("POTION:16419 : 1"); items.add("POTION:16424 : 1"); items.add("POTION:16458 : 1"); items.add("POTION:16460 : 1"); items.add("POTION:16460 : 1"); for (int i = 0; i < 27; i++) items.add("POTION:16421 : 1");  this.KitsConfig.set("Kits.Vanilla.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Vanilla.Abilities", abilities); this.KitsConfig.set("Kits.Vanilla.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Vanilla.Description", Arrays.asList(new String[] { "&bGet some really good", "&bSplash potions! but instead of soup", "&bYou have instant heal 2 splash potions" })); }  if (!this.KitsConfig.contains("Kits.Burrower")) { this.KitsConfig.set("Kits.Burrower.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Burrower.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Burrower.Item", "BRICK"); this.KitsConfig.set("Kits.Burrower.Price", Integer.valueOf(450)); this.KitsConfig.set("Kits.Burrower.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Burrower.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Burrower.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Burrower.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("BRICK : 1 : name:&cPanic room"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Burrower.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Burrower"); this.KitsConfig.set("Kits.Burrower.Abilities", abilities); this.KitsConfig.set("Kits.Burrower.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Burrower.Description", Arrays.asList(new String[] { "&bGet a brick that will", "&bBuild a panic room for you", "&bYou will be safe in there" })); }  if (!this.KitsConfig.contains("Kits.Zen")) { this.KitsConfig.set("Kits.Zen.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Zen.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Zen.Item", "SLIME_BALL"); this.KitsConfig.set("Kits.Zen.Price", Integer.valueOf(500)); this.KitsConfig.set("Kits.Zen.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Zen.Armor.Chestplate", "CHAINMAIL_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Zen.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Zen.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("SLIME_BALL : 1 : name:&cTeleporter"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Zen.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Zen"); this.KitsConfig.set("Kits.Zen.Abilities", abilities); this.KitsConfig.set("Kits.Zen.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Zen.Description", Arrays.asList(new String[] { "&bGet a slime ball that will", "&bTeleport you to the nearest", "&bEnemy!" })); }  if (!this.KitsConfig.contains("Kits.Viking")) { this.KitsConfig.set("Kits.Viking.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Viking.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Viking.Item", "DIAMOND_AXE"); this.KitsConfig.set("Kits.Viking.Price", Integer.valueOf(300)); this.KitsConfig.set("Kits.Viking.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Viking.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Viking.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Viking.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_AXE : 1 : enchant:DAMAGE_ALL:1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Viking.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Viking.Abilities", abilities); this.KitsConfig.set("Kits.Viking.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Viking.Description", Arrays.asList(new String[] { "&bA basic kit with a diamond axe", "&bInstead of a diamond sword" })); }  if (!this.KitsConfig.contains("Kits.Viper")) { this.KitsConfig.set("Kits.Viper.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Viper.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Viper.Item", "EYE_OF_ENDER"); this.KitsConfig.set("Kits.Viper.Price", Integer.valueOf(600)); this.KitsConfig.set("Kits.Viper.Armor.Helmet", "LEATHER_HELMET : 1 : dye:GREEN"); this.KitsConfig.set("Kits.Viper.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Viper.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Viper.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Viper.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Viper"); this.KitsConfig.set("Kits.Viper.Abilities", abilities); this.KitsConfig.set("Kits.Viper.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Viper.Description", Arrays.asList(new String[] { "&bHave a chance of biting", "&bYour enemy while fighting", "&bWhich gives them a poison effect" })); }  if (!this.KitsConfig.contains("Kits.Monk")) { this.KitsConfig.set("Kits.Monk.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Monk.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Monk.Item", "BLAZE_ROD"); this.KitsConfig.set("Kits.Monk.Price", Integer.valueOf(700)); this.KitsConfig.set("Kits.Monk.Armor.Helmet", "LEATHER_HELMET : 1 : dye:YELLOW"); this.KitsConfig.set("Kits.Monk.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Monk.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Monk.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("BLAZE_ROD : 1 : name:&cRight click a player to use!"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Monk.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Monk"); this.KitsConfig.set("Kits.Monk.Abilities", abilities); this.KitsConfig.set("Kits.Monk.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Monk.Description", Arrays.asList(new String[] { "&bGet a magical rod that will", "&bSwap the item in the target hand", "&bWith a random item in their hotbar!" })); }  if (!this.KitsConfig.contains("Kits.Hulk")) { this.KitsConfig.set("Kits.Hulk.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Hulk.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Hulk.Item", "SKULL_ITEM:4"); this.KitsConfig.set("Kits.Hulk.Price", Integer.valueOf(900)); this.KitsConfig.set("Kits.Hulk.Armor.Helmet", "LEATHER_HELMET : 1 : dye:GREEN"); this.KitsConfig.set("Kits.Hulk.Armor.Chestplate", "DIAMOND_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Hulk.Armor.Leggings", "CHAINMAIL_LEGGINGS : 1"); this.KitsConfig.set("Kits.Hulk.Armor.Boots", "LEATHER_BOOTS : 1 : dye:GREEN"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("SKULL_ITEM:4 : 1 : name:&cSmash!"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Hulk.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Hulk"); this.KitsConfig.set("Kits.Hulk.Abilities", abilities); this.KitsConfig.set("Kits.Hulk.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Hulk.Description", Arrays.asList(new String[] { "&bSmash the ground and release your", "&bAnger! Causing blocks and players", "&bTo fly away" })); }  if (!this.KitsConfig.contains("Kits.Cactus")) { this.KitsConfig.set("Kits.Cactus.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Cactus.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Cactus.Item", "CACTUS"); this.KitsConfig.set("Kits.Cactus.Price", Integer.valueOf(700)); this.KitsConfig.set("Kits.Cactus.Armor.Helmet", "IRON_HELMET : 1 : enchant:THORNS:2"); this.KitsConfig.set("Kits.Cactus.Armor.Chestplate", "IRON_CHESTPLATE : 1 : enchant:THORNS:2"); this.KitsConfig.set("Kits.Cactus.Armor.Leggings", "LEATHER_LEGGINGS : 1 : enchant:THORNS:2"); this.KitsConfig.set("Kits.Cactus.Armor.Boots", "LEATHER_BOOTS : 1 : enchant:THORNS:2"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); for (int i = 0; i < 35; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Cactus.Items", items); ArrayList<String> abilities = new ArrayList<String>(); this.KitsConfig.set("Kits.Cactus.Abilities", abilities); this.KitsConfig.set("Kits.Cactus.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Cactus.Description", Arrays.asList(new String[] { "&bGet thorns armor!" })); }  if (!this.KitsConfig.contains("Kits.Rider")) { this.KitsConfig.set("Kits.Rider.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Rider.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Rider.Item", "DIAMOND_BARDING"); this.KitsConfig.set("Kits.Rider.Price", Integer.valueOf(400)); this.KitsConfig.set("Kits.Rider.Armor.Helmet", "LEATHER_HELMET : 1"); this.KitsConfig.set("Kits.Rider.Armor.Chestplate", "IRON_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Rider.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Rider.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("DIAMOND_BARDING : 1"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Rider.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Rider"); this.KitsConfig.set("Kits.Rider.Abilities", abilities); this.KitsConfig.set("Kits.Rider.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Rider.Description", Arrays.asList(new String[] { "&bSummon a horse that you can ride!" })); }  if (!this.KitsConfig.contains("Kits.Summoner")) { this.KitsConfig.set("Kits.Summoner.Enabled", Boolean.valueOf(true)); this.KitsConfig.set("Kits.Summoner.Require-Permission", Boolean.valueOf(false)); this.KitsConfig.set("Kits.Summoner.Item", "IRON_BLOCK"); this.KitsConfig.set("Kits.Summoner.Price", Integer.valueOf(600)); this.KitsConfig.set("Kits.Summoner.Armor.Helmet", "IRON_HELMET : 1"); this.KitsConfig.set("Kits.Summoner.Armor.Chestplate", "CHAINMAIL_CHESTPLATE : 1"); this.KitsConfig.set("Kits.Summoner.Armor.Leggings", "IRON_LEGGINGS : 1"); this.KitsConfig.set("Kits.Summoner.Armor.Boots", "IRON_BOOTS : 1"); ArrayList<String> items = new ArrayList<String>(); items.add("DIAMOND_SWORD : 1"); items.add("IRON_BLOCK : 1"); for (int i = 0; i < 34; i++) items.add("MUSHROOM_SOUP : 1");  this.KitsConfig.set("Kits.Summoner.Items", items); ArrayList<String> abilities = new ArrayList<String>(); abilities.add("Summoner"); this.KitsConfig.set("Kits.Summoner.Abilities", abilities); this.KitsConfig.set("Kits.Summoner.Potion-Effects", Arrays.asList(new String[0])); this.KitsConfig.set("Kits.Summoner.Description", Arrays.asList(new String[] { "&bSummon an iron golem that will", "&bAttack any one attacks him" })); }  saveKitsConfig(); } public ItemStack getItemstackFilled(String path) { ItemStack item; String[] spliter = path.split(" : ");
/*      */     
/* 1028 */     if (spliter[0].contains(":")) {
/* 1029 */       item = new ItemStack(Material.getMaterial(spliter[0].split(":")[0]), Integer.valueOf(spliter[1]).intValue(), Short.valueOf(spliter[0].split(":")[1]).shortValue());
/*      */     } else {
/* 1031 */       item = new ItemStack(Material.getMaterial(spliter[0]), Integer.valueOf(spliter[1]).intValue());
/*      */     } 
/* 1033 */     int i = 2;
/* 1034 */     while (i < spliter.length) {
/*      */       
/* 1036 */       if (spliter[i].split(":")[0].equalsIgnoreCase("enchant")) {
/* 1037 */         item.addUnsafeEnchantment(Enchantment.getByName(spliter[i].split(":")[1]), Integer.valueOf(spliter[i].split(":")[2]).intValue());
/*      */       }
/* 1039 */       else if (spliter[i].split(":")[0].equalsIgnoreCase("name")) {
/* 1040 */         this.plugin.setName(item, ChatColor.translateAlternateColorCodes('&', spliter[i].split(":")[1]));
/*      */       }
/* 1042 */       else if (spliter[i].split(":")[0].equalsIgnoreCase("lore")) {
/* 1043 */         this.plugin.addLore(item, ChatColor.translateAlternateColorCodes('&', spliter[i].split(":")[1]));
/*      */       }
/* 1045 */       else if (spliter[i].split(":")[0].equalsIgnoreCase("dye")) {
/* 1046 */         LeatherArmorMeta meta = (LeatherArmorMeta)item.getItemMeta();
/* 1047 */         meta.setColor(getColor(spliter[i].split(":")[1]));
/* 1048 */         item.setItemMeta((ItemMeta)meta);
/*      */       } 
/*      */       
/* 1051 */       i++;
/*      */     } 
/* 1053 */     return item; }
/*      */ 
/*      */   
/*      */   public void setupRanks() {
/* 1057 */     if (this.RanksConfig.getConfigurationSection("Ranks") == null) {
/* 1058 */       this.RanksConfig.set("Ranks.Newbie.Required-Exp", Integer.valueOf(0));
/* 1059 */       this.RanksConfig.set("Ranks.Newbie.Commands-Excuted-When-Rank-Reached", Arrays.asList(new String[0]));
/* 1060 */       this.RanksConfig.set("Ranks.Starter.Required-Exp", Integer.valueOf(25));
/* 1061 */       this.RanksConfig.set("Ranks.Starter.Commands-Excuted-When-Rank-Reached", Arrays.asList(new String[] { "kb coins add %player% 500", "kb kitunlocker give %player% 1" }));
/* 1062 */       this.RanksConfig.set("Ranks.Survivor.Required-Exp", Integer.valueOf(75));
/* 1063 */       this.RanksConfig.set("Ranks.Survivor.Commands-Excuted-When-Rank-Reached", Arrays.asList(new String[] { "kb coins add %player% 750", "kb kitunlocker give %player% 1" }));
/* 1064 */       this.RanksConfig.set("Ranks.Pro.Required-Exp", Integer.valueOf(150));
/* 1065 */       this.RanksConfig.set("Ranks.Pro.Commands-Excuted-When-Rank-Reached", Arrays.asList(new String[] { "kb coins add %player% 1000", "kb kitunlocker give %player% 1" }));
/* 1066 */       this.RanksConfig.set("Ranks.Legend.Required-Exp", Integer.valueOf(300));
/* 1067 */       this.RanksConfig.set("Ranks.Legend.Commands-Excuted-When-Rank-Reached", Arrays.asList(new String[] { "kb coins add %player% 2000", "kb kitunlocker give %player% 1" }));
/* 1068 */       this.RanksConfig.set("Ranks.Immortal.Required-Exp", Integer.valueOf(600));
/* 1069 */       this.RanksConfig.set("Ranks.Immortal.Commands-Excuted-When-Rank-Reached", Arrays.asList(new String[] { "kb coins add %player% 4000", "kb kitunlocker give %player% 1" }));
/* 1070 */       this.RanksConfig.set("Ranks.God.Required-Exp", Integer.valueOf(1200));
/* 1071 */       this.RanksConfig.set("Ranks.God.Commands-Excuted-When-Rank-Reached", Arrays.asList(new String[] { "kb coins add %player% 5000", "kb kitunlocker give %player% 1" }));
/*      */     } 
/* 1073 */     saveRanksConfig();
/*      */   }
/*      */   
/*      */   public void loadRanks() {
/* 1077 */     if (this.RanksConfig.getConfigurationSection("Ranks") == null)
/* 1078 */       return;  for (String rankName : this.RanksConfig.getConfigurationSection("Ranks").getKeys(false)) {
/* 1079 */       int RequiredExp = this.RanksConfig.getInt("Ranks." + rankName + ".Required-Exp");
/* 1080 */       List<String> excutedCmds = this.RanksConfig.getStringList("Ranks." + rankName + ".Commands-Excuted-When-Rank-Reached");
/* 1081 */       this.plugin.Ranks.put(rankName.toLowerCase(), new Rank(rankName, RequiredExp, excutedCmds));
/*      */     } 
/*      */   }
/*      */   
/*      */   public void setupAbilities() {
/* 1086 */     if (!this.AbilitiesConfig.contains("Abilities.Hades.Cooldown")) {
/* 1087 */       this.AbilitiesConfig.set("Abilities.Hades.Cooldown", Integer.valueOf(45));
/*      */     }
/* 1089 */     if (!this.AbilitiesConfig.contains("Abilities.Hades.Amount-Of-Dogs")) {
/* 1090 */       this.AbilitiesConfig.set("Abilities.Hades.Amount-Of-Dogs", Integer.valueOf(3));
/*      */     }
/* 1092 */     if (!this.AbilitiesConfig.contains("Abilities.Hades.Dogs-Last-For")) {
/* 1093 */       this.AbilitiesConfig.set("Abilities.Hades.Dogs-Last-For", Integer.valueOf(10));
/*      */     }
/* 1095 */     if (!this.AbilitiesConfig.contains("Abilities.Thor.Cooldown")) {
/* 1096 */       this.AbilitiesConfig.set("Abilities.Thor.Cooldown", Integer.valueOf(10));
/*      */     }
/* 1098 */     if (!this.AbilitiesConfig.contains("Abilities.Thor.Lightning-Damage")) {
/* 1099 */       this.AbilitiesConfig.set("Abilities.Thor.Lightning-Damage", Integer.valueOf(4));
/*      */     }
/* 1101 */     if (!this.AbilitiesConfig.contains("Abilities.Thor.Strike-Radius")) {
/* 1102 */       this.AbilitiesConfig.set("Abilities.Thor.Strike-Radius", Integer.valueOf(5));
/*      */     }
/* 1104 */     if (!this.AbilitiesConfig.contains("Abilities.Stomper.Stomp-Radius")) {
/* 1105 */       this.AbilitiesConfig.set("Abilities.Stomper.Stomp-Radius", Integer.valueOf(5));
/*      */     }
/* 1107 */     if (!this.AbilitiesConfig.contains("Abilities.Stomper.Max-Fall-Damage")) {
/* 1108 */       this.AbilitiesConfig.set("Abilities.Stomper.Max-Fall-Damage", Integer.valueOf(2));
/*      */     }
/* 1110 */     if (!this.AbilitiesConfig.contains("Abilities.Stomper.Max-Damage-Dealt-When-Stomped-While-Shifting")) {
/* 1111 */       this.AbilitiesConfig.set("Abilities.Stomper.Max-Damage-Dealt-When-Stomped-While-Shifting", Integer.valueOf(2));
/*      */     }
/* 1113 */     if (!this.AbilitiesConfig.contains("Abilities.Spiderman.Cooldown")) {
/* 1114 */       this.AbilitiesConfig.set("Abilities.Spiderman.Cooldown", Integer.valueOf(30));
/*      */     }
/* 1116 */     if (!this.AbilitiesConfig.contains("Abilities.Spiderman.Webs-Last-For")) {
/* 1117 */       this.AbilitiesConfig.set("Abilities.Spiderman.Webs-Last-For", Integer.valueOf(10));
/*      */     }
/* 1119 */     if (!this.AbilitiesConfig.contains("Abilities.Prisoner.Cooldown")) {
/* 1120 */       this.AbilitiesConfig.set("Abilities.Prisoner.Cooldown", Integer.valueOf(60));
/*      */     }
/* 1122 */     if (!this.AbilitiesConfig.contains("Abilities.Prisoner.Prison-Lasts-For")) {
/* 1123 */       this.AbilitiesConfig.set("Abilities.Prisoner.Prison-Lasts-For", Integer.valueOf(6));
/*      */     }
/* 1125 */     if (!this.AbilitiesConfig.contains("Abilities.Climber.Cooldown")) {
/* 1126 */       this.AbilitiesConfig.set("Abilities.Climber.Cooldown", Integer.valueOf(30));
/*      */     }
/* 1128 */     if (!this.AbilitiesConfig.contains("Abilities.Climber.Time-Until-Chicken-Disappear")) {
/* 1129 */       this.AbilitiesConfig.set("Abilities.Climber.Time-Until-Chicken-Disappear", Integer.valueOf(5));
/*      */     }
/* 1131 */     if (!this.AbilitiesConfig.contains("Abilities.Dragon.Cooldown")) {
/* 1132 */       this.AbilitiesConfig.set("Abilities.Dragon.Cooldown", Integer.valueOf(30));
/*      */     }
/* 1134 */     if (!this.AbilitiesConfig.contains("Abilities.Dragon.Amount-Of-Bursts")) {
/* 1135 */       this.AbilitiesConfig.set("Abilities.Dragon.Amount-Of-Bursts", Integer.valueOf(3));
/*      */     }
/* 1137 */     if (!this.AbilitiesConfig.contains("Abilities.Dragon.Damage-Dealt")) {
/* 1138 */       this.AbilitiesConfig.set("Abilities.Dragon.Damage-Dealt", Integer.valueOf(4));
/*      */     }
/* 1140 */     if (!this.AbilitiesConfig.contains("Abilities.Dragon.Fire-Lasts-For")) {
/* 1141 */       this.AbilitiesConfig.set("Abilities.Dragon.Fire-Lasts-For", Integer.valueOf(5));
/*      */     }
/* 1143 */     if (!this.AbilitiesConfig.contains("Abilities.Dragon.Fire-Range")) {
/* 1144 */       this.AbilitiesConfig.set("Abilities.Dragon.Fire-Range", Integer.valueOf(10));
/*      */     }
/* 1146 */     if (!this.AbilitiesConfig.contains("Abilities.Phantom.Cooldown")) {
/* 1147 */       this.AbilitiesConfig.set("Abilities.Phantom.Cooldown", Integer.valueOf(45));
/*      */     }
/* 1149 */     if (!this.AbilitiesConfig.contains("Abilities.Phantom.Flight-Lasts-For")) {
/* 1150 */       this.AbilitiesConfig.set("Abilities.Phantom.Flight-Lasts-For", Integer.valueOf(5));
/*      */     }
/* 1152 */     if (!this.AbilitiesConfig.contains("Abilities.Timelord.Cooldown")) {
/* 1153 */       this.AbilitiesConfig.set("Abilities.Timelord.Cooldown", Integer.valueOf(45));
/*      */     }
/* 1155 */     if (!this.AbilitiesConfig.contains("Abilities.Timelord.Freeze-Radius")) {
/* 1156 */       this.AbilitiesConfig.set("Abilities.Timelord.Freeze-Radius", Integer.valueOf(7));
/*      */     }
/* 1158 */     if (!this.AbilitiesConfig.contains("Abilities.Timelord.Freeze-Time")) {
/* 1159 */       this.AbilitiesConfig.set("Abilities.Timelord.Freeze-Time", Integer.valueOf(10));
/*      */     }
/* 1161 */     if (!this.AbilitiesConfig.contains("Abilities.Burrower.Cooldown")) {
/* 1162 */       this.AbilitiesConfig.set("Abilities.Burrower.Cooldown", Integer.valueOf(60));
/*      */     }
/* 1164 */     if (!this.AbilitiesConfig.contains("Abilities.Burrower.Room-Lasts-For")) {
/* 1165 */       this.AbilitiesConfig.set("Abilities.Burrower.Room-Lasts-For", Integer.valueOf(8));
/*      */     }
/* 1167 */     if (!this.AbilitiesConfig.contains("Abilities.Zen.Cooldown")) {
/* 1168 */       this.AbilitiesConfig.set("Abilities.Zen.Cooldown", Integer.valueOf(60));
/*      */     }
/* 1170 */     if (!this.AbilitiesConfig.contains("Abilities.Zen.Max-Range")) {
/* 1171 */       this.AbilitiesConfig.set("Abilities.Zen.Max-Range", Integer.valueOf(60));
/*      */     }
/* 1173 */     if (!this.AbilitiesConfig.contains("Abilities.Viper.Poison-Chance")) {
/* 1174 */       this.AbilitiesConfig.set("Abilities.Viper.Poison-Chance", "5%");
/*      */     }
/* 1176 */     if (!this.AbilitiesConfig.contains("Abilities.Viper.Poison-Lasts-For")) {
/* 1177 */       this.AbilitiesConfig.set("Abilities.Viper.Poison-Lasts-For", Integer.valueOf(10));
/*      */     }
/* 1179 */     if (!this.AbilitiesConfig.contains("Abilities.Viper.Poison-Level")) {
/* 1180 */       this.AbilitiesConfig.set("Abilities.Viper.Poison-Level", Integer.valueOf(1));
/*      */     }
/* 1182 */     if (!this.AbilitiesConfig.contains("Abilities.Monk.Cooldown")) {
/* 1183 */       this.AbilitiesConfig.set("Abilities.Monk.Cooldown", Integer.valueOf(45));
/*      */     }
/* 1185 */     if (!this.AbilitiesConfig.contains("Abilities.Hulk.Cooldown")) {
/* 1186 */       this.AbilitiesConfig.set("Abilities.Hulk.Cooldown", Integer.valueOf(30));
/*      */     }
/* 1188 */     if (!this.AbilitiesConfig.contains("Abilities.Hulk.Damage-Dealt")) {
/* 1189 */       this.AbilitiesConfig.set("Abilities.Hulk.Damage-Dealt", Integer.valueOf(5));
/*      */     }
/* 1191 */     if (!this.AbilitiesConfig.contains("Abilities.Hulk.Cooldown")) {
/* 1192 */       this.AbilitiesConfig.set("Abilities.Hulk.Cooldown", Integer.valueOf(45));
/*      */     }
/* 1194 */     if (!this.AbilitiesConfig.contains("Abilities.Hulk.Damage-Radius")) {
/* 1195 */       this.AbilitiesConfig.set("Abilities.Hulk.Damage-Radius", Integer.valueOf(10));
/*      */     }
/* 1197 */     if (!this.AbilitiesConfig.contains("Abilities.Rider.Cooldown")) {
/* 1198 */       this.AbilitiesConfig.set("Abilities.Rider.Cooldown", Integer.valueOf(45));
/*      */     }
/* 1200 */     if (!this.AbilitiesConfig.contains("Abilities.Rider.Horse-Lasts-For")) {
/* 1201 */       this.AbilitiesConfig.set("Abilities.Rider.Horse-Lasts-For", Integer.valueOf(10));
/*      */     }
/* 1203 */     if (!this.AbilitiesConfig.contains("Abilities.Summoner.Cooldown")) {
/* 1204 */       this.AbilitiesConfig.set("Abilities.Summoner.Cooldown", Integer.valueOf(70));
/*      */     }
/* 1206 */     if (!this.AbilitiesConfig.contains("Abilities.Summoner.Golem-Lasts-For")) {
/* 1207 */       this.AbilitiesConfig.set("Abilities.Summoner.Golem-Lasts-For", Integer.valueOf(20));
/*      */     }
/* 1209 */     if (!this.AbilitiesConfig.contains("Abilities.Suicidal.Cooldown")) {
/* 1210 */       this.AbilitiesConfig.set("Abilities.Suicidal.Cooldown", Integer.valueOf(30));
/*      */     }
/* 1212 */     saveAbilitiesConfig();
/*      */   }
/*      */   
/*      */   public Color getColor(String path) {
/* 1216 */     Color color = Color.BLACK;
/*      */     
/* 1218 */     if (path.equalsIgnoreCase("BLACK")) {
/* 1219 */       return color;
/*      */     }
/* 1221 */     if (path.equalsIgnoreCase("AQUA")) {
/* 1222 */       color = Color.AQUA;
/*      */     }
/* 1224 */     else if (path.equalsIgnoreCase("BLUE")) {
/* 1225 */       color = Color.BLUE;
/*      */     }
/* 1227 */     else if (path.equalsIgnoreCase("FUCHSIA")) {
/* 1228 */       color = Color.FUCHSIA;
/*      */     }
/* 1230 */     else if (path.equalsIgnoreCase("GRAY")) {
/* 1231 */       color = Color.GRAY;
/*      */     }
/* 1233 */     else if (path.equalsIgnoreCase("GREEN")) {
/* 1234 */       color = Color.GREEN;
/*      */     }
/* 1236 */     else if (path.equalsIgnoreCase("LIME")) {
/* 1237 */       color = Color.LIME;
/*      */     }
/* 1239 */     else if (path.equalsIgnoreCase("MAROON")) {
/* 1240 */       color = Color.MAROON;
/*      */     }
/* 1242 */     else if (path.equalsIgnoreCase("NAVY")) {
/* 1243 */       color = Color.NAVY;
/*      */     }
/* 1245 */     else if (path.equalsIgnoreCase("OLIVE")) {
/* 1246 */       color = Color.OLIVE;
/*      */     }
/* 1248 */     else if (path.equalsIgnoreCase("ORANGE")) {
/* 1249 */       color = Color.ORANGE;
/*      */     }
/* 1251 */     else if (path.equalsIgnoreCase("PURPLE")) {
/* 1252 */       color = Color.PURPLE;
/*      */     }
/* 1254 */     else if (path.equalsIgnoreCase("RED")) {
/* 1255 */       color = Color.RED;
/*      */     }
/* 1257 */     else if (path.equalsIgnoreCase("SILVER")) {
/* 1258 */       color = Color.SILVER;
/*      */     }
/* 1260 */     else if (path.equalsIgnoreCase("TEAL")) {
/* 1261 */       color = Color.TEAL;
/*      */     }
/* 1263 */     else if (path.equalsIgnoreCase("WHITE")) {
/* 1264 */       color = Color.WHITE;
/*      */     }
/* 1266 */     else if (path.equalsIgnoreCase("YELLOW")) {
/* 1267 */       color = Color.YELLOW;
/*      */     } 
/*      */     
/* 1270 */     return color;
/*      */   }
/*      */   
/*      */   public String getColorName(Color c) {
/* 1274 */     String ColorName = "BLACK";
/*      */     
/* 1276 */     if (c.equals(Color.BLACK)) {
/* 1277 */       return ColorName;
/*      */     }
/* 1279 */     if (c.equals(Color.AQUA)) {
/* 1280 */       ColorName = "AQUA";
/*      */     }
/* 1282 */     else if (c.equals(Color.BLUE)) {
/* 1283 */       ColorName = "BLUE";
/*      */     }
/* 1285 */     else if (c.equals(Color.FUCHSIA)) {
/* 1286 */       ColorName = "FUCHSIA";
/*      */     }
/* 1288 */     else if (c.equals(Color.GRAY)) {
/* 1289 */       ColorName = "GRAY";
/*      */     }
/* 1291 */     else if (c.equals(Color.GREEN)) {
/* 1292 */       ColorName = "GREEN";
/*      */     }
/* 1294 */     else if (c.equals(Color.LIME)) {
/* 1295 */       ColorName = "LIME";
/*      */     }
/* 1297 */     else if (c.equals(Color.MAROON)) {
/* 1298 */       ColorName = "MAROON";
/*      */     }
/* 1300 */     else if (c.equals(Color.NAVY)) {
/* 1301 */       ColorName = "NAVY";
/*      */     }
/* 1303 */     else if (c.equals(Color.OLIVE)) {
/* 1304 */       ColorName = "OLIVE";
/*      */     }
/* 1306 */     else if (c.equals(Color.ORANGE)) {
/* 1307 */       ColorName = "ORANGE";
/*      */     }
/* 1309 */     else if (c.equals(Color.PURPLE)) {
/* 1310 */       ColorName = "PURPLE";
/*      */     }
/* 1312 */     else if (c.equals(Color.RED)) {
/* 1313 */       ColorName = "RED";
/*      */     }
/* 1315 */     else if (c.equals(Color.SILVER)) {
/* 1316 */       ColorName = "SILVER";
/*      */     }
/* 1318 */     else if (c.equals(Color.TEAL)) {
/* 1319 */       ColorName = "TEAL";
/*      */     }
/* 1321 */     else if (c.equals(Color.WHITE)) {
/* 1322 */       ColorName = "WHITE";
/*      */     }
/* 1324 */     else if (c.equals(Color.YELLOW)) {
/* 1325 */       ColorName = "YELLOW";
/*      */     } 
/*      */     
/* 1328 */     return ColorName;
/*      */   }
/*      */   
/*      */   public String transformItemStackToString(ItemStack armor) {
/* 1332 */     String path = (armor != null) ? armor.getType().name() : "";
/* 1333 */     if (!path.isEmpty()) {
/* 1334 */       if (armor.getType().getMaxDurability() - armor.getDurability() != armor.getType().getMaxDurability()) {
/* 1335 */         path = String.valueOf(path) + ":" + armor.getDurability();
/*      */       }
/* 1337 */       path = String.valueOf(path) + " : " + armor.getAmount();
/* 1338 */       if (armor.getItemMeta().getDisplayName() != null) {
/* 1339 */         path = String.valueOf(path) + " : name:" + armor.getItemMeta().getDisplayName();
/*      */       }
/* 1341 */       if (armor.getItemMeta().getLore() != null && !armor.getItemMeta().getLore().isEmpty()) {
/* 1342 */         for (String lore : armor.getItemMeta().getLore()) {
/* 1343 */           path = String.valueOf(path) + " : lore:" + lore;
/*      */         }
/*      */       }
/* 1346 */       if (armor.getEnchantments() != null && !armor.getEnchantments().isEmpty()) {
/* 1347 */         for (Enchantment ench : armor.getEnchantments().keySet()) {
/* 1348 */           path = String.valueOf(path) + " : enchant:" + ench.getName().toUpperCase() + ":" + armor.getEnchantments().get(ench);
/*      */         }
/*      */       }
/* 1351 */       if (armor.getType().name().contains("LEATHER_")) {
/* 1352 */         LeatherArmorMeta meta = (LeatherArmorMeta)armor.getItemMeta();
/* 1353 */         if (meta.getColor() != null) {
/* 1354 */           path = String.valueOf(path) + " : dye:" + getColorName(meta.getColor());
/*      */         }
/*      */       } 
/*      */     } 
/* 1358 */     return path;
/*      */   }
/*      */ }


/* Location:              C:\Users\韩烨均\Documents\Tencent Files\133280410\FileRecv\KitBattle.jar!\me\wazup\kitbattle\FileManager.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       1.1.2
 */